fix-glibc-2.28-build
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Tue, 25 Sep 2018 21:26:54 +0000 (22:26 +0100)
committerLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Tue, 25 Sep 2018 21:26:54 +0000 (22:26 +0100)
Gbp-Pq: Name fix-glibc-2.28-build.patch

src/corelib/global/qconfig-bootstrapped.h
src/corelib/io/qfilesystemengine_unix.cpp

index 3469ebe5e65e41a0629f80a96049f756cb3c01af..c5585ea32ade76175f74d4891bce828d1274e9f5 100644 (file)
 #define QT_NO_QOBJECT
 #define QT_FEATURE_process -1
 #define QT_FEATURE_regularexpression -1
-#define QT_FEATURE_renameat2 -1
+#ifdef __GLIBC_PREREQ
+# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1)
+#else
+# define QT_FEATURE_renameat2 -1
+#endif
 #define QT_FEATURE_sharedmemory -1
 #define QT_FEATURE_slog2 -1
-#define QT_FEATURE_statx -1
+#ifdef __GLIBC_PREREQ
+# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1)
+#else
+# define QT_FEATURE_statx -1
+#endif
 #define QT_FEATURE_syslog -1
 #define QT_NO_SYSTEMLOCALE
 #define QT_FEATURE_systemsemaphore -1
index be6ce48d0cb15b8896faa7794edec2ccc0126f8f..3e4f33a3ba55b9a5176286811930f7bbaa7767dd 100644 (file)
@@ -91,7 +91,6 @@ extern "C" NSString *NSTemporaryDirectory();
 #  include <sys/syscall.h>
 #  include <sys/sendfile.h>
 #  include <linux/fs.h>
-#  include <linux/stat.h>
 
 // in case linux/fs.h is too old and doesn't define it:
 #ifndef FICLONE
@@ -112,6 +111,7 @@ static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newp
 #    endif
 
 #    if !QT_CONFIG(statx) && defined(SYS_statx)
+#      include <linux/stat.h>
 static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf)
 { return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); }
 #    elif !QT_CONFIG(statx) && !defined(SYS_statx)